#!/usr/bin/env python

import sys, os

def init ( liwe, admin = 0 ):
	from liwe import parts

	parts.add ( liwe.layman, [ 'base' ] )
	parts.add_wwl ( liwe.layman, [ "arrowbox" ] )

	liwe.layman.add_js ( "modules/media_manager/js/media_manager.js" )
	liwe.layman.add_js_code ( "media_manager.init ();" )

	if admin and int ( admin ):
		parts.add ( liwe.layman, [ "form", "ext", "cookie" ] )
		parts.add_wwl ( liwe.layman, [ "grid", "uploader", "tabs", "dgrid" ] )

		liwe.layman.add_js ( "modules/media_manager/js/media_manager.admin.js" )
		liwe.layman.add_js_code ( "media_manager.admin.init ();" )

	liwe.layman.add_css ( "modules/media_manager/gfx/media_manager.css" )
	return ''
